<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<input type="text" name="" id="text" value="" />
		<button type="button" class="btn" id="btn">查询</button>

		<script type="text/javascript">
			// var btn = document.getElementById("btn");
			// var text = document.getElementById('text')
			// // var btn = document.getElementsByClassName(".btn");
			// btn.onclick = function() {
			// 	console.log(text.value.trim())
			// }
			// let bas=2;
			// var cons=(bas)=>{return bas}

			// console.log(cons(bas));
			var a = [];
			var b = [];
			for (var i = 0; i < 10; i++) {
				a[i] = function() {
					console.log(i);
				};
			}
			a[6]();
			for (let k = 0; k < 10; k++) {
				b.push(k);
			}
			console.log(b[2]);

			var c = [1, 2, 3, 4, 5];
			console.log(c.map(x => x * x));
			// var d=[{a:1},{b:2},{c:3}];
			console.log(...c);
			// console.log(...d);
			var e = JSON.parse(JSON.stringify(c))
			var f = "[1,2,3,4,5,6]";
			var g = JSON.parse(f)
			let {
				toString: h
			} = 123;
			e[0] = 5;
			console.log(c, e, g);
			console.log(h === Number.prototype.toString);
			// let [x,y]=[y,x];
			// (0.1+0.2-0.3).toFixed(20)  //浮点数的计算不准确
			// Number.EPSILON.toFixed(20)  //实质是可接受的误差范围
			console.log(Math.pow(2, 53))
			console.log(Math.pow(2, 54))
			console.log(Number.MAX_SAFE_INTEGER);
			console.log(Math.trunc("-6.66"))
			console.log(Math.sign("-100"))
			console.log(c.copyWithin(0, 1, 4));
		</script>
	</body>
</html>
